package org.lyy.service.impl;

import org.lyy.dao.OrderDetailDao;
import org.lyy.entity.OrderDetail;
import org.lyy.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("OrderDetailService")
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    private OrderDetailDao dao;

    @Override
    public void save(OrderDetail orderDetail) {
        try {
            dao.save(orderDetail);
        }catch (Exception e){
            System.out.println(e);
        }
    }
    public void delete(String orderId){
        try{
            dao.delete(orderId);
        }catch (Exception e){
            System.out.println(e);
        }
    }

   public  List<OrderDetail> selectOrderId(String orderId){
       return dao.selectOrderId(orderId);
   }
}
